Exercise: Building a Publication using the Chatbot
Learn how to populate some pages in your publication using natural language prompts typed or spoken into the Pyramid Chatbot. This example end-to-end process adds a cover page, visuals, slicers, insights, and so on.
The functionality is AI-driven, so the output you see may not exactly match the screen shots or description in here. You should be aware of this and always be careful to check that you are happy with the output that you have generated.
Note: The process described in this guide is a "design time" activity that you can complete in either Publish Pro or Publish Lite. The output from the process will be a PDF that you build manually using the Run button.
Before you begin
- You must have an Enterprise Edition license.
- You can only make use of this functionality if your administrator has selected the Enable Generative AI checkbox in the AI Settings page of the Admin Console. If your administrator does not select this option, the function is not available for use.
End-to-end process
Prior to getting started, launch Publish and create a new publication. It doesn't technically matter whether the publication includes any existing pages or content items, but we are going to create entirely new content and so we recommend using empty pages for this walkthrough. This ensures that you can fully understand the impact of the changes that you are making.
Step 1: Open the Chatbot and select a model
When you build a publication in Publish or a presentation in Present, you always need to select the Data Source as the first step:
- Click Chatbot (blue arrow below) at the bottom-right of the page, alongside the app tabs.
- Select the model that contains the data you want to include in your publication.
The Chatbot opens with the model selection panel visible:
If needed, more models can be accessed by clicking on the << More Models option.
More information
- To learn more about selecting models in the Chatbot, see Select a Model
Step 2: Generate a publication from a prompt
With a page open on the canvas:
- Type a simple prompt into the Chatbot using natural language.
- Click Run (purple arrow) to submit the prompt to the engine for generation.
Remember: You're describing the type of business or analytic data that you want your publication to include. For example: "Build me a publication around customer profiles. Focus on content covering sales by month, product returns, and demographics" (green arrow):
After a short delay, Pyramid: (i) generates the content and (ii) displays a confirmation message describing the new publication in the chat (blue arrow below).
Your publication may not look exactly like the preceding example, even with the same prompt, but it will include the following:
- A cover page (yellow arrow) including a generated title. Since this is a new publication, the cover page is on page 1 and has styling as defined by the theme associated with your publication.
- One or more visuals (purple arrow) that satisfy the analytic question posed by your prompt. Pyramid uses AI to determine the required visualization types, measures, and dimensions to be included. Tip: You can edit each visual at any time by right-clicking it and selecting Open in Discover, where you can adjust or share it.
- One or more slicers (visible in the Interaction Manager, orange arrow). Pyramid performs heuristics to create interactions between the slicers and content items. Tip: You can use the Interaction Manager to adjust these relationships and manage the filtering of content items when exporting or subscribing to the publication.
- KPIs, which are generated using optimization techniques (green arrow).
Tip: The AI engine determines the optimal layout of the content items in the publication using Auto Layout. You can rearrange the items by manually adjusting the content on the canvas using drag and drop.
More information
- To learn more about using prompts, see Writing Natural Language Queries
Step 3: Generate more content
The preceding example showed how the Chatbot can be used to create a publication from analytic requests, but you can also provide more detail to Pyramid to ensure that your publication includes content items or visualization types that you specifically request.
- Add a New Page to your publication (orange arrow).
- With the new page selected, type a more detailed prompt into the Chatbot. This natural language prompt should describe the type of data to include and the types of visuals or other details.
- Click Run.
For example: "A comparison of sales by age and gender. A different report for a column chart of profitability by product subcategory. And a pie chart showing me manufacturer performance through returns, sales and expenses, and I want to slice it by years and show insights."
Note: Notice that this prompt is both more verbose and more specific. It names the visualization types (column chart, pie chart), includes insights, and indicates specific measures, dimensions, and slicers.
Again, there is a short delay while Pyramid generates the content and response:
In this case, the Chatbot creates:
- A page containing a title for this "section." Because this is not Page 1, this page contains a generated title but is not styled as a cover.
- Since "Page Insights" or "insights" appears in your prompt, a
#PageInsights
panel is created (green arrow). This will be replaced with generated insight text when you build the publication. - Measures, dimensions, slicers and visualization types (graph types) are as explicitly requested. For example, "a pie chart showing manufacturer performance through returns, sales and expenses" (orange arrow).
- The content items are distributed in an optimal fashion and pages are added if they are required. Discoveries and the
#PageInsights
variable text field each fill half a page.
More information
Auto Layout is used to generate an optimal layout for your pages as they are created. To learn more about this feature, see:
Step 4: Review and modify the pages
Once created, you can modify the content of your publication using the standard processes.
Adding, removing, or adjusting content items to suit your requirements:
Formatting and applying design features to your pages or overall publication:
Step 5: Build the publication
As you edit your publication, you should regularly view your changes. The easiest way to do this is by manually building your document in an appropriate format:
- Do one of the following:
- Click Run (top-left) or press F2 on your keyboard.
- Type
print
into the Chatbot and press Enter.
- From the Output tab, select document format and any settings associated with the format.
- Click the Slicers tab and choose the values you want your slicers to take in the published document.
- Click Export.
The Print & Export dialog opens.
Tip: You should select the typical output for your publication when it is distributed, we recommend building a PDF.
Note: The preceding example shows a simple drop-down for selecting a Country filter.
Pyramid builds the publication in the format selected and with the settings specified for the format type and slicers.
More information
This step manually prints the publication for you to see the effect of your changes. When you use Publish for real, it is likely that you will schedule your builds and distribute the output documents to your readership automatically. To learn more about these features, see:
Step 5: Save Publication
Save your publication to your My Content folder by clicking Save in the status bar at the top-right of your canvas:
This saves your publication locally.
More information
This step describes how to save your publication locally. If you want other members of your team to be able to use or edit your publication, and you have sufficient access rights to do so, you should save it to your workspace or public folders.
- To learn more, see Save and share publications
Alternative processes
To learn how to build a presentation without using AI: